<div class="navbar navbar-fixed-top nbg">
    <div class="navbar-inner">
        <?php
        if($this->params['action'] == 'search'){
            ?>
            <a class="brand" href="<?php echo $this->Html->url(array('action' => 'index'));?>">
                <?php echo $this->Html->image('app/logo_sm.png', array('height' => '24'));?>
            </a>

            <form class="navbar-form pull-left" action="<?php echo $this->Html->url(array('action' => 'search')); ?>" method="post">
                <div class="input-append">
                    <span class="add-on">Search By Index Number</span>
                    <input name="Student[id]" type="text" class="input-xlarge" placeholder="Find Student By Index No." value="<?php echo $search_term; ?>" />
                    <button class="btn" type="submit" value="Search"><i class="icon-search"></i></button>
                    <!--<span class="add-on"><i class="icon-search"></i></span>-->
                </div>
            </form>
        <?php
        }
        elseif($this->params['action'] != 'index'){
        ?>
        <a class="brand" href="<?php echo $this->Html->url(array('action' => 'index')); ?>">
            <?php echo $this->Html->image('app/logo_sm.png', array('height' => '24')); ?>
        </a>

        <span class="title pull-left"><?php echo $title_for_layout;?></span>
        <?php
            }
        ?>

        <ul class="nav pull-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="icon-user"></i> <b><?php echo $authuser['fname'].' '.$authuser['mname'].' '.$authuser['lname']; ?></b>
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="<?php echo $this->Html->url(array('action' => 'editprofile')); ?>"><i class="icon-user"></i> Edit Profile</a></li>
                    <li><a href="<?php echo $this->Html->url(array('controller' => 'Bank','action' => 'logout')); ?>"><i class="icon-off"></i> Sign Out</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>